package com.telit.android.entity;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;


/**
 * 角色实体类
 *
 * @author Tracine
 * @since 2021-05-10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_role")
public class SysRoleEntity implements Serializable {

    @ApiModelProperty(value = "角色编码", dataType = "String")
    @NotBlank(message = "角色编码不能为空")
    @Size(max = 10, message = "该信息限定20个字符以内")
    private String code;

    @ApiModelProperty(value = "角色名称", dataType = "String")
    @NotNull(message = "该字段为必填项")
    @Size(max = 10, message = "该信息限定20个字符以内")
    private String name;

    @ApiModelProperty(value = "数据字典-角色类型", dataType = "String")
    @NotBlank(message = "角色类型不能为空")
    @Size(max = 20, message = "该信息限定20个字符以内")
    private String type;

    @ApiModelProperty(value = "角色排序(默认0)", dataType = "Integer")
    private Integer orderNum;

    @ApiModelProperty(value = "是否禁用(0否,1是,默认0)", dataType = "Integer")
    private Integer disabled;

    @ApiModelProperty(value = "是否内置(0否,1是,默认0)", dataType = "Integer")
    private Integer buildIn;

    @ApiModelProperty(value = "逻辑删除(0否,1是,默认0)", dataType = "Integer")
    @TableLogic(value = "0", delval = "1")
    private Integer deleted;

    @ApiModelProperty(value = "备注", dataType = "String")
    @Size(max = 255, message = "该信息限定255个字符以内")
    private String remark;

    private static final long serialVersionUID = 1L;
}
